<template>
    <div>
        <div class="film-item" v-for="(film,index) in films" :key="index" @click="goDetai(film.filmId)">
          <!-- <div
            class="film-img"
            :style="`background-image: url(${film.filmImg})`"
          ></div> -->
          <div class="film-img">
              <img :src="film.filmImg" alt="">
          </div>
          <div class="film-title">{{ film.filmName }}</div>
          
          <!-- film-source组件 -->
          <film-source :source="film.source"></film-source>
        </div>
      </div>
</template>

<script>
export default {
    data(){
        return {

        }
    },
    props:{
        films:Array
    },
    created() {
        
    },
    methods: {
        goDetai(filmId){
            this.$router.push(`/detail/${filmId}`)
        }
    },
}
</script>

<style lang="less" scoped>
    
</style>